package com.smartStatus.core.constant;

/**
 * @author cdw
 * @date 2019-04-28
 * <p>
 * 缓存的key 常量
 */
public interface CacheConstants {

    /**
     * 全局缓存，在缓存名称上加上该前缀表示该缓存不区分租户，比如:
     * <p/>
     * {@code @Cacheable(value = CacheConstants.GLOBALLY+CacheConstants.MENU_DETAILS, key = "#roleId  + '_menu'", unless = "#result == null")}
     */
    String GLOBALLY = "gl:";

    /**
     * 验证码前缀
     */
    String DEFAULT_CODE_KEY = "DEFAULT_CODE_KEY:";

    /**
     * 注册验证码前缀
     */
    String DEFAULT_REGISTER_CODE_KEY = "DEFAULT_REGISTER_CODE_KEY:";

    /**
     * 身份证正面缓存
     */
    String ID_CARD_POSITIVE_CACHE_CODE_KEY = "ID_CARD_POSITIVE_CACHE_CODE_KEY:";
    /**
     * 身份证反面缓存
     */
    String ID_CARD_BACK_CACHE_CODE_KEY = "ID_CARD_BACK_CACHE_CODE_KEY:";

    /**
     * 营业执照缓存
     */
    String BUSINESS_LICENSE_CACHE_CODE_KEY = "BUSINESS_LICENSE_CACHE_CODE_KEY:";

    /**
     * 企业云章缓存
     */
    String CHAPTER_CACHE_CODE_KEY = "CHAPTER_CACHE_CODE_KEY:";

    /**
     * 身份证缓存有效期 （秒）
     */
    int ID_CARD_CACHE_CODE_TIME = 3600;

    /**
     * 菜单信息缓存
     */
    String MENU_DETAILS = "menu_details";

    /**
     * 用户信息缓存
     */
    String USER_DETAILS = GLOBALLY + "user_details";

    /**
     * 字典信息缓存
     */
    String DICT_DETAILS = "dict_details";


    /**
     * oauth 客户端信息
     */
    String CLIENT_DETAILS_KEY = "smartStatus_oauth:client:details";


    /**
     * spring boot admin 事件key
     */
    String EVENT_KEY = "event_key";

    /**
     * 路由存放
     */
    String ROUTE_KEY = "gateway_route_key";

    /**
     * redis reload 事件
     */
    String ROUTE_REDIS_RELOAD_TOPIC = "gateway_redis_route_reload_topic";

    /**
     * 内存reload 时间
     */
    String ROUTE_JVM_RELOAD_TOPIC = "gateway_jvm_route_reload_topic";

    /**
     * 参数缓存
     */
    String PARAMS_DETAILS = "params_details";

    /**
     * 社交帐号缓存
     */
    String SOCIAL_DETAILS = "tour_shop_social_details";

    /**
     * 租户缓存 (不区分租户)
     */
    String TENANT_DETAILS = GLOBALLY + "tenant_details";

    /**
     * 支付Token
     */
    String PAY_TOKEN = "PAY_TOKEN";

    /**
     * 发票token
     */
    String INVOICE_TOKEN = "INVOICE_TOKEN";

    /**
     * 未读消息
     */
    String NOT_READ = "NOT_READ:";
}
